package com.dream.domain;

import com.dream.domain.user.User;
import com.dream.util.GuidGenerator;
import com.dream.util.JodaTimeUtil;
import org.joda.time.DateTime;

/**
 * Created by IntelliJ IDEA.
 * User: ZhongGang
 * Date: 12-12-22
 * Time: 下午2:42
 */
public abstract class Domain {
    private Integer id;
    private Integer version;
    private String guid = GuidGenerator.generate();
    private Boolean active = Boolean.TRUE;
    private DateTime createTime = JodaTimeUtil.now();
    private User createBy;

    protected Domain() {
    }

    public String guid() {
        return guid;
    }

    public Boolean active() {
        return active;
    }

    public DateTime createTime() {
        return createTime;
    }

    public User creator() {
        return this.createBy;
    }
}
